import request from '@/utils/request';

// 获取验证码
export function getCodeImg() {
  return request({
    url: '/captchaImage',
    method: 'get',
  });
}

// 登录
export function login(data) {
  return request({
    url: '/login',
    method: 'post',
    data: data,
  });
}

// 获取用户信息
export function getUserInfo() {
  return request({
    url: '/userInfo',
    method: 'get',
  });
}

// 查询导航菜单
export function getRouters(params) {
  return request({
    url: '/routers',
    method: 'get',
    params: params,
  });
}
